
monarchy_mechanic = {
	monarchy = yes
	heir = yes
	queen = yes
	basic_reform = yes # = invisible/does not take up a slot
	valid_for_nation_designer = no
	custom_attributes = {
		enables_aristocratic_idea_group = yes
	}
	modifiers = {
		nobles_influence_modifier = 0.05
	}
}

#Feudalism vs Autocracy:

feudalism_reform = {
	icon = "castle"
	allow_normal_conversion = yes
	legacy_equivalent = feudal_monarchy
	valid_for_nation_designer = yes
	nation_designer_cost = 0
	modifiers = {
		vassal_income = 0.25
		nobles_influence_modifier = 0.05
		maratha_exclusive_influence_modifier = 0.05
		rajput_exclusive_influence_modifier = 0.05
	}
	ai = {
		factor = 0.5 #generic
	}
}

autocracy_reform = {
	icon = "crown"
	allow_normal_conversion = yes
	legacy_equivalent = despotic_monarchy
	valid_for_nation_designer = yes
	nation_designer_cost = 0
	modifiers = {
		unjustified_demands = -0.1
	}
	ai = {
		factor = 0.5 #generic
	}
}

plutocratic_reform = {
	icon = "asian_scripture"
	allow_normal_conversion = yes
	legacy_equivalent = despotic_monarchy
	potential = {
		OR = {
			technology_group = indian
			technology_group = muslim
			technology_group = chinese
			technology_group = east_african
		}
	}
	nation_designer_trigger = {
		OR = {
			technology_group = indian
			technology_group = muslim
			technology_group = chinese
			technology_group = east_african
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	modifiers = {
		merchants = 1
		nobles_influence_modifier = -0.05
		burghers_influence_modifier = 0.05
		vaisyas_influence_modifier = 0.05
	}
	custom_attributes = {
		enables_plutocratic_idea_group = yes
		enables_aristocratic_idea_group = no
	}
	boost_income = yes
	conditional = {
		allow = {
			has_dlc = "Leviathan"
		}
		allow_draft_transport_ships = yes
	}
	conditional = {
		allow = {
			has_dlc = "Res Publica"
			NOT = { has_dlc = "Mare Nostrum" }
		}
		can_use_trade_post = yes
	}
	conditional = {
		allow = {
			has_dlc = "Mare Nostrum"
			NOT = { has_dlc = "Res Publica" }
		}
		can_form_trade_league = yes
		trade_city_reform = trading_city
	}
	conditional = {
		allow = {
			has_dlc = "Res Publica"
			has_dlc = "Mare Nostrum"
		}
		can_use_trade_post = yes
		can_form_trade_league = yes
		trade_city_reform = trading_city
	}
	ai = {
		factor = 0.75 #generic
	}
}

austrian_archduchy_reform = {
	icon = "austrian_archduchy_reform"
	allow_normal_conversion = yes
	legacy_equivalent = austrian_archduchy
	valid_for_nation_designer = yes
	potential = {
		OR = {
			tag = HAB
			was_tag = HAB
			has_reform = austrian_archduchy_reform
			have_had_reform = austrian_archduchy_reform
		}
	}
	nation_designer_cost = 0
	modifiers = {
		liberty_desire_from_subject_development = -0.33
		nobles_influence_modifier = 0.05
		maratha_exclusive_influence_modifier = 0.05
		rajput_exclusive_influence_modifier = 0.05
	}
}

grand_duchy_reform = {
	icon = "peasants"
	allow_normal_conversion = yes
	potential = {
		OR = {
			AND = {
				tag = LIT
				NOT = { map_setup = map_setup_random }
			}
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = grand_duchy_reform
			}
		}
	}
	legacy_equivalent = despotic_monarchy
	fixed_rank = 1
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	modifiers = {
		governing_capacity = 100
	}
}

indian_sultanate_reform = {
	icon = "indian_sultanate"
	allow_normal_conversion = yes
	potential = {
		OR = {
			capital_scope = {
				superregion = india_superregion
			}
			has_reform = indian_sultanate_reform
		}
		religion_group = muslim
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	nation_designer_trigger = {
		religion_group = muslim
		capital_scope = {
			superregion = india_superregion
		}
	}
	legacy_equivalent = indian_sultanate_legacy

	modifiers = {
		tolerance_heathen = 3
	}

	conditional = {
		allow = { has_dlc = "Cradle of Civilization" }
		government_abilities = {
			iqta_mechanic
		}
	}
}

shogunate = {
	icon = "shogunate"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_country_flag = formed_japan_flag }
		OR = {
			AND = {
				capital_scope = {
					province_id = 1020
				}
				culture_group = japanese_g
				NOT = { exists = JAP }
			}
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = shogunate
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 50
	nation_designer_trigger = {
		culture_group = japanese_g
		technology_group = chinese
		capital_scope = { region = japan_region }
		owns = 1020
	}
	legacy_equivalent = shogunate_legacy
	fixed_rank = 2
	maintain_dynasty = yes
	allow_vassal_war = yes
	allow_vassal_alliance = yes
	lock_level_when_selected = yes
	can_change_primary_culture = no

	modifiers = {
		diplomats = 1
		envoy_travel_time = -0.25
		max_absolutism = 5
	}

	custom_attributes = {
		locked_government_type = yes
	}
}

daimyo = {
	icon = "daimyo"
	allow_normal_conversion = no
	potential = {
		NOT = { has_country_flag = formed_japan_flag }
		overlord = { has_reform = shogunate }
	}
	replacement_on_independence_war = indep_daimyo
	legacy_equivalent = daimyo_legacy
	fixed_rank = 1
	maintain_dynasty = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 0
	lock_level_when_selected = yes
	nation_designer_trigger = {
		culture_group = japanese_g
		technology_group = chinese
		capital_scope = { region = japan_region }
	}
	modifiers = {
		land_morale = 0.1
		infantry_power = 0.1
	}
	custom_attributes = {
		locked_government_type = yes
	}
}

indep_daimyo = {
	icon = "samurai"
	allow_normal_conversion = no
	potential = {
		NOT = { has_country_flag = formed_japan_flag }
		OR = {
			AND = {
				OR = {
					is_subject = no
					overlord = { NOT = { has_reform = shogunate } }
				}
				capital_scope = { region = japan_region }
				culture_group = japanese_g
			}
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = indep_daimyo
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 0
	nation_designer_trigger = {
		culture_group = japanese_g
		technology_group = chinese
		capital_scope = { region = japan_region }
	}
	legacy_equivalent = indep_daimyo_legacy
	maintain_dynasty = yes

	modifiers = {
		land_morale = 0.1
		infantry_power = 0.1
		governing_capacity = -150
	}
	custom_attributes = {
		locked_government_type = yes
	}
}

celestial_empire = {
	icon = "celestial_empire"
	allow_normal_conversion = no
	potential = {
		if = {
			limit = {
				has_dlc = "Mandate of Heaven"
			}
			is_emperor_of_china = yes
		}
		else = {
			OR = {
				has_reform = celestial_empire
				AND = {
					culture_group = east_asian
					num_of_cities = 50
				}
			}
		}
		NOT = { has_global_flag = empire_of_china_dismantled }
	}
	legacy_equivalent = celestial_empire_legacy
	maintain_dynasty = yes
	allow_force_tributary = no
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	lock_level_when_selected = yes
	nation_designer_trigger = {
		culture_group = east_asian
		technology_group = chinese
		capital_scope = {
			OR = {
				region = north_china_region
				region = xinan_region
				region = south_china_region
			}
		}
	}
	factions = {
		temples
		enuchs
		bureaucrats
	}

	fixed_rank = 3
	start_territory_to_estates = 0.9

	modifiers = {
		prestige = 0.5
		church_influence_modifier = -0.1
		nobles_influence_modifier = -0.1
		burghers_influence_modifier = -0.1
		governing_capacity = 470
	}
	
	ai = {
		factor = 1000 # should always be picked if available
	}

	custom_attributes = {
		locked_government_type = yes
	}

	conditional = {
		allow = { has_dlc = "Mandate of Heaven" }
		has_meritocracy = yes
		factions = {}
	}
}

elective_monarchy = {
	icon = "elective_monarchy"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_reform = elective_monarchy
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = elective_monarchy
			}
		}
	}
	legacy_equivalent = elective_monarchy_legacy
	lock_level_when_selected = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	nation_designer_trigger = {
		has_dlc = "Res Publica"
	}
	modifiers = {
		vassal_income = 0.25
		global_unrest = -1
		max_absolutism = -30
		governing_capacity = 100
	}

	conditional = {
		allow = { has_dlc = "Res Publica" }
		is_elective = yes
	}
	custom_attributes = {
		locked_government_type = yes
	}
}

iqta = {
	icon = "muslim"
	allow_normal_conversion = yes
	potential = {
		religion_group = muslim
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	nation_designer_trigger = {
		religion_group = muslim
	}

	legacy_equivalent = iqta_legacy
	queen = no
	modifiers = {
		vassal_income = 0.33
		global_tax_modifier = 0.05
	}

	conditional = {
		allow = { has_dlc = "Cradle of Civilization" }
		government_abilities = {
			iqta_mechanic
		}
	}
}

english_monarchy = {
	icon = "british_queen"
	allow_normal_conversion = no
	potential = {
		have_had_reform = english_monarchy
	}
	lock_level_when_selected = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 15
	nation_designer_trigger = {
		has_dlc = "Common Sense"
	}
	legacy_equivalent = english_monarchy_legacy
	start_territory_to_estates = 0.3
	modifiers = {
		governing_capacity = 50
		legitimacy = 0.5
		global_unrest = -1
		max_absolutism = -30
	}

	conditional = {
		allow = { has_dlc = "Common Sense" }
		has_parliament = yes

		custom_attributes = {
			blocked_call_diet = yes
		}
	}
}

ottoman_government = {
	lock_level_when_selected = yes
	allow_normal_conversion = yes
	icon = "ottoman_government"
	potential = {
		religion_group = muslim
		OR = {
			AND = {
				tag = TUR
				NOT = { map_setup = map_setup_random }
			}
			AND = {
				tag = RUM
				NOT = { map_setup = map_setup_random }
			}
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = ottoman_government
			}
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 20
	nation_designer_trigger = {
		religion_group = muslim
	}
	legacy_equivalent = ottoman_government_legacy
	maintain_dynasty = yes
	modifiers = {
		unjustified_demands = -0.1
		legitimacy = 0.5
		max_absolutism = 5
		governing_capacity = 150
	}

	custom_attributes = {
		locked_government_type = yes
	}

	conditional = {
		allow = { has_dlc = "Cradle of Civilization" }
		has_pashas = yes
	}
	conditional = {
		allow = { has_dlc = "Rights of Man" }
		has_harem = yes
	}
}

prussian_monarchy = {
	icon = "prussian_monarchy"
	allow_normal_conversion = yes
	potential = {
		OR = {
			AND = {
				tag = PRU
				NOT = { map_setup = map_setup_random }
			}
			AND = {
				tag = GER
				have_had_reform = prussian_monarchy
			}
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = prussian_monarchy
			}
		}
	}
	trigger = {
		OR = {
			is_playing_custom_nation = yes
			religion = protestant
			religion = reformed
			religion = hussite
			religion = anglican
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 100
	legacy_equivalent = prussian_monarchy_legacy

	modifiers = {
		war_exhaustion = -0.02
		global_unrest = -2
		global_autonomy = -0.075
		max_absolutism = 10
		monarch_military_power = 3
		nobles_loyalty_modifier = 0.1
		governing_capacity_modifier = -0.5
	}

	conditional = {
		allow = { has_dlc = "Rights of Man" }
		militarised_society = yes
	}
}

austrian_dual_monarchy = {
	icon = "austrian_dual_monarchy_reform"
	allow_normal_conversion = yes
	legacy_equivalent = austrian_archduchy
	potential = { #added via script
		has_dlc = "Emperor"
		OR = {
			has_reform = austrian_dual_monarchy
			have_had_reform = austrian_dual_monarchy
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 100
	nation_designer_trigger = {
		has_dlc = "Emperor"
	}

	modifiers = {
		num_accepted_cultures = 2
		global_unrest = -2
		monarch_diplomatic_power = 2
		promote_culture_cost = -0.33
	}
}

principality = {
	icon = "russian_principality"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_reform = tsardom }
		NOT = { have_had_reform = tsardom }
		religion = orthodox
		OR = {
			culture_group = east_slavic
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = principality
			}
		}
	}
	fixed_rank = 1
	legacy_equivalent = principality_legacy
	valid_for_nation_designer = yes
	nation_designer_cost = 5
	nation_designer_trigger = {
		culture_group = east_slavic
		religion = orthodox
	}
	modifiers = {
		global_unrest = -1
		global_tax_modifier = 0.05
		governing_capacity = 100
	}

	conditional = {
		allow = { has_dlc = "Third Rome" }
		government_abilities = {
			russian_mechanic
		}
	}
}

tsardom = {
	icon = "king"
	allow_normal_conversion = yes
	potential = {
		religion = orthodox
		culture_group = east_slavic
		OR = {
			AND = {
				tag = RUS
				NOT = { map_setup = map_setup_random }
			}
			AND = {
				tag = UKR
				NOT = { map_setup = map_setup_random }
			}
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = tsardom
			}
		}
	}
	fixed_rank = 3
	legacy_equivalent = tsardom_legacy
	valid_for_nation_designer = yes
	nation_designer_cost = 40

	nation_designer_trigger = {
		culture_group = east_slavic
		religion = orthodox
	}

	modifiers = {
		global_manpower_modifier = 0.20
		yearly_absolutism = 0.5
		global_autonomy = -0.05
		governing_capacity = 250
	}

	conditional = {
		allow = { has_dlc = "Third Rome" }
		government_abilities = {
			russian_mechanic
		}
		claim_states = yes
	}
}

mamluk_government = {
	icon = "mamluk_government"
	allow_normal_conversion = yes
	potential = {
		religion_group = muslim
		OR = {
			AND = {
				tag = MAM
				NOT = { map_setup = map_setup_random }
			}
			have_had_reform = mamluk_government
		}
	}
	legacy_equivalent = mamluk_government_legacy
	queen = no

	valid_for_nation_designer = yes
	nation_designer_cost = 60

	nation_designer_trigger = {
		religion_group = muslim
	}

	modifiers = {
		num_accepted_cultures = 3
		#-50% cost to promote cultures
		global_autonomy = -0.025
		monarch_admin_power = 2
		same_culture_advisor_cost = -0.25
		promote_culture_cost = -0.5
		governing_capacity = 50
		nobles_influence_modifier = 0.1
	}

	conditional = {
		allow = { has_dlc = "Cradle of Civilization" }
		government_abilities = {
			mamluk_mechanic
		}
		heir = no
		foreign_slave_rulers = yes
	}
}

feudal_theocracy = {
	icon = "feudal_theocracy"
	allow_normal_conversion = yes
	potential = {
		OR = {
			AND = {
				OR = {
					religion_group = muslim
					religion_group = zoroastrian_group
				}
				OR = {
					has_reform = feudal_theocracy
					have_had_reform = feudal_theocracy
				}
			}
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = feudal_theocracy
			}
		}
	}
	nation_designer_trigger = {
		OR = {
			religion_group = muslim
			religion_group = zoroastrian_group
		}
	}
	legacy_equivalent = feudal_theocracy_legacy
	valid_for_nation_designer = yes
	nation_designer_cost = 60
	modifiers = {
		missionaries = 1
		global_missionary_strength = 0.01
		tolerance_own = 2
		governing_capacity = 50
		brahmins_hindu_loyalty_modifier = 0.05
		church_loyalty_modifier = 0.05
	}

	conditional = {
		allow = { has_dlc = "Cradle of Civilization" }
		government_abilities = {
			feudal_theocracy_mechanic
		}
	}
}

mughal_government = {
	icon = "peacock_throne"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		AND = {
			tag = MUG
			NOT = { map_setup = map_setup_random }
		}
	}
	lock_level_when_selected = yes
	legacy_equivalent = feudal_monarchy

	modifiers = {
		tolerance_own = 1
		governing_capacity = 150
	}

	assimilation_cultures = {
		altaic = {
			artillery_cost = -0.1
		}
		baltic = {
			naval_forcelimit_modifier = 0.05
		}
		british = {
			ship_durability = 0.05
		}
		burman = {
			free_leader_pool = 1
		}
		byzantine = {
			legitimacy = 0.25
		}
		carpathian = {
			mercenary_cost = -0.1
		}
		caucasian = {
			mercenary_discipline = 0.05
		}
		gaelic = {
			shock_damage = 0.05
		}
		central_indic = {
			land_attrition = -0.1
		}
		east_asian = {
			state_maintenance_modifier = -0.2
		}
		kongo_group = {
			heir_chance = 0.5
		}
		cushitic = {
			missionaries = 1
		}
		dravidian = {
			global_trade_goods_size_modifier = 0.05
		}
		african = {
			global_tax_income = 10
		}
		east_slavic = {
			land_forcelimit_modifier = 0.1
		}
		eastern_aryan = {
			production_efficiency = 0.05
		}
		evenks = {
			cavalry_flanking = 0.2
		}
		french = {
			diplomats = 1
		}
		germanic = {
			global_institution_spread = 0.15
		}
		great_lakes_group = {
			loot_amount = 0.5
		}
		hindusthani = {
			core_creation = -0.1
		}
		iberian = {
			global_colonial_growth = 10
		}
		iranian = {
			advisor_cost = -0.1
		}
		japanese_g = {
			land_morale = 0.1
		}
		kamchatkan_g = {
			hostile_attrition = 1
		}
		korean_g = {
			idea_cost = -0.05
		}
		latin = {
			embracement_cost = -0.1
		}
		lost_cultures_group = {
			discipline = 0.05
		}
		turko_semitic = {
			cavalry_power = 0.1
		}
		maghrebi = {
			privateer_efficiency = 0.25
		}
		malay = {
			merchants = 1
		}
		mande = {
			tolerance_heretic = 1
		}
		pacific = {
			global_sailors_modifier = 0.1
		}
		sahelian = {
			movement_speed = 0.1
		}
		scandinavian = {
			mil_advisor_cost = -0.1
		}
		southeastasian_group = {
			development_cost = -0.05
		}
		south_slavic = {
			warscore_cost_vs_other_religion = -0.1
		}
		southern_african = {
			inflation_reduction = 0.05
		}
		sudanese = {
			caravan_power = 0.1
		}
		tartar = {
			cavalry_cost = -0.15
		}
		thai_group = {
			build_cost = -0.05
		}
		tibetan_group = {
			prestige_per_development_from_conversion = 0.5
		}
		finno_ugric = {
			prestige_decay = -0.01
		}
		west_african = {
			global_autonomy = -0.01
		}
		west_slavic = {
			leader_land_fire = 1
		}
		western_aryan = {
			trade_efficiency = 0.05
		}
	}
}

revolutionary_empire_reform = {
	lock_level_when_selected = yes
	icon = "rioting_burning_2"
	allow_normal_conversion = no
	potential = {
		has_reform = revolutionary_empire_reform
	}
	legacy_equivalent = revolutionary_empire
	valid_for_new_country = no
	uses_revolutionary_zeal = yes
	revolutionary = yes
	fixed_rank = 3
	modifiers = {
		global_manpower_modifier = 0.25
		land_morale = 0.10
		global_autonomy = -0.2
		governing_capacity = 150
		max_revolutionary_zeal = 50
	}

	custom_attributes = {
		locked_government_type = yes
	}

	removed_effect = {
		hidden_effect = {
			if = {
				limit = {
					has_country_flag = is_revolutionary_china_flag
					is_revolutionary = no
				}
				clr_country_flag = is_revolutionary_china_flag
				restore_country_name = yes
				override_country_name = CHINA_STRING
				set_country_flag = is_china_flag
			}
			if = {
				limit = {
					has_country_flag = is_revolutionary_turkey_flag
					is_revolutionary = no
				}
				clr_country_flag = is_revolutionary_turkey_flag
				restore_country_name = yes
				override_country_name = TURKEY_STRING
				set_country_flag = is_turkey_flag
			}
			if = {
				limit = {
					has_country_flag = is_revolutionary_gurkani_flag
					is_revolutionary = no
				}
				clr_country_flag = is_revolutionary_gurkani_flag
				restore_country_name = yes
				override_country_name = GURKANI_EMPIRE_STRING
				set_country_flag = is_gurkani_flag
			}
		}
	}
}

mandala_reform = {
	icon = "mandala_system"
	allow_normal_conversion = yes
	potential = {
		NOT = { religion = shinto }
		NOT = { religion = confucianism }
		OR = {
			religion_group = eastern
			religion_group = dharmic
			religion_group = muslim
			religion = animism
		}
		technology_group = chinese
		OR = {
			has_dlc = "Leviathan"
			has_dlc = "Dharma"
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	nation_designer_trigger = {
		NOT = { religion = shinto }
		NOT = { religion = confucianism }
		OR = {
			religion_group = eastern
			religion_group = dharmic
			religion_group = muslim
		}
		technology_group = chinese
		OR = {
			has_dlc = "Leviathan"
			has_dlc = "Dharma"
		}
	}
	legacy_equivalent = despotic_monarchy
	modifiers = {
		vassal_income = 0.15
		vassal_forcelimit_bonus = 1
		governing_capacity_modifier = -0.33
	}
	free_concentrate_development = yes
}

nayankara_reform = {
	icon = "nayankara_system"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		technology_group = indian
		OR = {
			religion_group = dharmic
			religion = buddhism
			religion = vajrayana
			religion = mahayana
		}
		OR = {
			culture_group = dravidian
			primary_culture = oriya
			primary_culture = sinhala
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	legacy_equivalent = feudal_monarchy
	nation_designer_trigger = {
		technology_group = indian
		OR = {
			religion_group = dharmic
			religion = buddhism
			religion = vajrayana
			religion = mahayana

		}
		OR = {
			culture_group = dravidian
			primary_culture = oriya
			primary_culture = sinhala
		}
	}
	modifiers = {
		vassal_forcelimit_bonus = 1
		global_manpower_modifier = 0.15
	}
}

misl_confederacy_reform = {
	allow_normal_conversion = yes
	icon = "misl_confederacy"
	potential = {
		has_dlc = "Dharma"
		religion = sikhism
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	nation_designer_trigger = {
		religion = sikhism
	}
	legacy_equivalent = feudal_monarchy
	modifiers = {
		global_manpower_modifier = 0.1
		land_maintenance_modifier = -0.1
	}
}

rajput_kingdom = {
	icon = "rajput_kingdom"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		OR = {
			culture_group = western_aryan
			primary_culture = vindhyan
		}
		NOT = { primary_culture = marathi }
		technology_group = indian
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 10
	nation_designer_trigger = {
		OR = {
			culture_group = western_aryan
			primary_culture = vindhyan
		}
		NOT = { primary_culture = marathi }
		technology_group = indian
	}
	legacy_equivalent = feudal_monarchy
	modifiers = {
		army_tradition = 0.25
	}
}

gond_kingdom = {
	icon = "chieftain"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		technology_group = indian
		primary_culture = gondi
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 0
	nation_designer_trigger = {
		technology_group = indian
		primary_culture = gondi
	}
	legacy_equivalent = tribal_kingdom_legacy
	modifiers = {
		defensiveness = 0.2
	}
}

siamese_absolutism = {
	icon = "indian_crown"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_country_flag = siam_royal_absolutism
			has_reform = siamese_absolutism
		}
	}
	valid_for_nation_designer = no
	modifiers = {
		max_absolutism = 10
		monarch_admin_power = 1
	}
	free_concentrate_development = yes
}

confucian_bureaucracy = {
	icon = "warrior_monks_reform"
	allow_normal_conversion = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 0
	nation_designer_trigger = {
		OR = {
			religion = confucianism
			primary_culture = vietnamese
		}
	}
	potential = {
		OR = {
			religion = confucianism
			primary_culture = vietnamese
		}
	}
	valid_for_nation_designer = yes
	modifiers = {
		advisor_cost = -0.1
	}
	ai = {
		factor = 100
	}
}

sakdina_system_reform = {
	icon = "sakdina_system_reform"
	allow_normal_conversion = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 0
	nation_designer_trigger = {
		OR = {
			primary_culture = central_thai
			primary_culture = northern_thai
		}
	}
	potential = {
		OR = {
			primary_culture = central_thai
			primary_culture = northern_thai
		}
	}
	valid_for_nation_designer = no
	modifiers = {
		stability_cost_modifier = -0.05
		global_unrest = -2
	}
	ai = {
		factor = 100
	}
}

uparaja_reform = {
	icon = "uparaja_reform"
	allow_normal_conversion = yes
	valid_for_nation_designer = yes
	nation_designer_cost = 0
	nation_designer_trigger = {
		religion = buddhism
		technology_group = chinese
	}
	potential = {
		religion = buddhism
		technology_group = chinese
	}
	valid_for_nation_designer = no
	modifiers = {
		monthly_heir_claim_increase = 0.05
		legitimacy = 0.5
		prestige = 0.5
	}
	ai = {
		factor = 1.5
		modifier = {
			factor = 2
			legitimacy = 75
		}
		modifier = {
			factor = 3
			tag = SIA
		}
	}
}

#Hereditary vs Nobility
enforce_privileges_reform = {
	icon = "people_walking"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	modifiers = {
		global_manpower_modifier = 0.15
	}
	ai = {
		factor = 1
		modifier = {
			factor = 2
			NOT = { max_manpower = 12 }
		}
	}
}

quash_noble_power_reform = {
	icon = "king_2"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	modifiers = {
		global_tax_modifier = 0.1
		nobles_influence_modifier = -0.1
		maratha_exclusive_influence_modifier = -0.1
		rajput_exclusive_influence_modifier = -0.1
	}
	ai = {
		factor = 1
		modifier = {
			factor = 1.5
			is_in_deficit = yes
		}
	}
}

enforce_trader_privileges_reform = {
	icon = "paper_money_map"
	allow_normal_conversion = yes
	potential = {
		is_reform_available = plutocratic_reform
		OR = {
			technology_group = indian
			technology_group = muslim
			technology_group = chinese
			technology_group = east_african
		}
	}
	trigger = {
		has_reform = plutocratic_reform
	}
	modifiers = {
		trade_range_modifier = 0.3
		trade_efficiency = 0.05
	}
	ai = {
		factor = 2
		modifier = {
			factor = 1.5
			trade_income_percentage = 0.35
		}
		modifier = {
			factor = 0.5
			NOT = {
				trade_income_percentage = 0.25
			}
		}
	}
}

bengali_reform = {
	icon = "merchant_ship"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		primary_culture = bengali
		religion_group = muslim
	}
	modifiers = {
		merchants = 1
		trade_efficiency = 0.1
	}
	ai = {
		factor = 5
	}
}

sufi_syncretism_reform = {
	icon = "muslim"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		primary_culture = bengali
		religion_group = muslim
	}
	modifiers = {
		global_missionary_strength = 0.01
		development_cost = -0.05
	}
	ai = {
		factor = 3
	}
}

poligar_reform = {
	icon = "indian_crown"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		technology_group = indian
		OR = {
			culture_group = dravidian
			primary_culture = oriya
			primary_culture = sinhala
		}
	}
	modifiers = {
		infantry_power = 0.1
		development_cost = -0.05
	}
	ai = {
		factor = 3
	}
}

khalsa_reform = {
	icon = "strength_of_the_khalsa"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		religion = sikhism
	}
	modifiers = {
		tolerance_heathen = 1
		tolerance_heretic = 1
		land_morale = 0.05
	}
	ai = {
		factor = 5
	}
}

deccani_society_reform = {
	icon = "noble_indian"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		is_revolutionary = no
		technology_group = indian
		religion_group = muslim
		OR = {
			culture_group = dravidian
			primary_culture = marathi
		}
	}
	modifiers = {
		free_dip_policy = 1
	}
	ai = {
		factor = 3
	}
}

black_army_reform = {
	icon = "black_army_reform"
	allow_normal_conversion = yes
	potential = {
		tag = HUN
		has_country_flag = black_army_reform_flag
		is_revolutionary = no
	}
	modifiers = {
		merc_maintenance_modifier = -0.15
		mercenary_discipline = 0.025
		nobles_loyalty_modifier = -0.1
	}
	ai = {
		factor = 3
	}
}

legion_of_honor_reform = {
	icon = "legion_of_honor_reform"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = yes
	}
	modifiers = {
		leader_cost = -0.1
		nobles_loyalty_modifier = 0.1
		maratha_exclusive_loyalty_modifier = 0.1
		rajput_exclusive_loyalty_modifier = 0.1
	}
	ai = {
		factor = 2.5
	}
}

imperial_nobility_reform = {
	icon = "imperial_nobility_reform"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = yes
	}
	modifiers = {
		advisor_cost = -0.1
		nobles_influence_modifier = -0.2
		maratha_exclusive_influence_modifier = -0.2
		rajput_exclusive_influence_modifier = -0.2
	}
	ai = {
		factor = 2.5
	}
}

#Bureaucracy:

centralize_reform = {
	icon = "paper_with_seal_3"
	allow_normal_conversion = yes
	potential = {
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
	}
	modifiers = {
		global_autonomy = -0.05
	}
}

decentralize_reform = {
	icon = "map"
	allow_normal_conversion = yes
	potential = {
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
	}
	modifiers = {
		num_accepted_cultures = 2
	}
	ai = {
		factor = 1
		modifier = {
			factor = 0.25
			NOT = {
				any_owned_province = {
					has_owner_accepted_culture = no
					has_owner_culture = no
				}
			}
		}
	}
}

sidhi_recruitment = {
	icon = "siddhi_recruitment"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		technology_group = indian
		religion_group = muslim
		OR = {
			culture_group = dravidian
			primary_culture = marathi
		}
	}
	modifiers = {
		fort_maintenance_modifier = -0.1
		governing_capacity = 100
	}
	ai = {
		factor = 2
	}
}

mansabdari_reform = {
	icon = "noble_muslim"
	allow_normal_conversion = yes
	potential = {
		tag = MUG
		NOT = { map_setup = map_setup_random }
		has_dlc = "Dharma"
	}
	modifiers = {
		army_tradition_decay = -0.003
		governing_capacity = 150
	}
	ai = {
		factor = 10
	}
}

examination_system_reform = {
	icon = "asian_scripture"
	allow_normal_conversion = yes
	potential = {
		OR = {
			religion = confucianism
			primary_culture = vietnamese
		}
	}
	trigger = {
		OR = {
			has_reform = confucian_bureaucracy
			has_reform = celestial_empire
		}
	}
	modifiers = {
		advisor_pool = 1
		nobles_influence_modifier = -0.1
	}
	ai = {
		factor = 10
	}
}

corvee_reform = {
	icon = "asian_scripture"
	allow_normal_conversion = yes
	potential = {
		OR = {
			culture_group = thai_group
			culture_group = burman
			primary_culture = khmer
		}
	}
	modifiers = {
		global_manpower_modifier = 0.1
		build_cost = -0.1
	}
	effect = {
		custom_tooltip = manpower_sailors_on_build_tt
	}
	ai = {
		factor = 10
	}
}

#Growth of Administration

clergy_in_administration_reform = {
	icon = "religious_leader"
	allow_normal_conversion = yes
	potential = {
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
	}
	modifiers = {
		free_adm_policy = 1
		
		brahmins_hindu_influence_modifier = 0.1
		brahmins_hindu_loyalty_modifier = 0.05

		church_influence_modifier = 0.1
		church_loyalty_modifier = 0.05
	}
	ai = {
		factor = 1
		modifier = {
			factor = 0.1
			OR = {
				AND = {
					religion = hinduism
					estate_influence = {
						estate = estate_brahmins
						influence = 90
					}
				}
				estate_influence = {
					estate = estate_church
					influence = 90
				}
			}
		}
	}
}

of_noble_bearing_reform = {
	icon = "nobleman"
	allow_normal_conversion = yes
	potential = {
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		NOT = {
			AND = {
				has_estate = estate_maratha
				technology_group = indian
				NOT = { has_estate = estate_nobles }
			}
		}
		NOT = {
			AND = {
				has_estate = estate_rajput
				technology_group = indian
				NOT = { has_estate = estate_nobles }
			}
		}
	}
	modifiers = {
		leader_cost = -0.1
		nobles_influence_modifier = 0.1
		maratha_exclusive_influence_modifier = 0.1
		rajput_exclusive_influence_modifier = 0.1
		nobles_loyalty_modifier = 0.05
		maratha_exclusive_loyalty_modifier = 0.05
		rajput_exclusive_loyalty_modifier = 0.05
	}
	ai = {
		factor = 1
		modifier = {
			factor = 0.1
			OR = {
				AND = {
					NOT = { has_estate = estate_nobles }
					OR = {
						estate_influence = {
							estate = estate_rajput
							influence = 90
						}
						estate_influence = {
							estate = estate_maratha
							influence = 90
						}
					}
				}
				estate_influence = {
					estate = estate_nobles
					influence = 90
				}
			}
		}
	}
}

meritocratic_focus_reform = {
	icon = "merchant"
	allow_normal_conversion = yes
	potential = {
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
	}
	modifiers = {
		advisor_cost = -0.1
		maratha_muslim_influence_modifier = 0.1
		rajput_muslim_influence_modifier = 0.1
		burghers_influence_modifier = 0.1
		burghers_loyalty_modifier = 0.05
		vaisyas_non_muslim_influence_modifier = 0.1
	}
	ai = {
		factor = 1
		modifier = {
			factor = 0.1
			OR = {
				AND = {
					religion_group = muslim
					OR = {
						estate_influence = {
							estate = estate_rajput
							influence = 90
						}
						estate_influence = {
							estate = estate_maratha
							influence = 90
						}
					}
				}
				AND = {
					NOT = { religion_group = muslim }
					estate_influence = {
						estate = estate_vaisyas
						influence = 90
					}
				}
				estate_influence = {
					estate = estate_burghers
					influence = 90
				}
			}
		}
	}
}

dakhni_culture_reform = {
	icon = "indian_crown"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		technology_group = indian
		religion_group = muslim
		OR = {
			culture_group = dravidian
			primary_culture = marathi
		}
	}
	modifiers = {
		state_maintenance_modifier = -0.2
	}
	ai = {
		factor = 2
	}
}

zabt_reform = {
	icon = "general_eastern_administrative"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		tag = MUG
	}
	modifiers = {
		governing_capacity = 150
	}
	ai = {
		factor = 5
	}
}

#deliberative_assembly

# parliamentary_reform defined in common file

royal_decree_reform = {
	icon = "king"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	modifiers = {
		max_absolutism = 5
	}
	ai = {
		factor = 1
	}
}

aristocratic_court_reform = {
	icon = "soldiers_2"
	allow_normal_conversion = yes
	modifiers = {
		army_tradition_decay = -0.003
	}
	ai = {
		factor = 1
	}
}

states_general_reform = {
	icon = "states_general"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	trigger = {
		NOT = { is_lesser_in_union = yes }
		is_emperor = no
	}

	modifiers = {
		stability_cost_modifier = -0.1
	}

	ai = {
		factor = 0 # AI should never pick this
	}

	removed_effect = {
		country_event = { id = dutch_republic.33 }
	}

	conditional = {
		allow = { has_dlc = "Res Publica" }
		queen = no
		heir = no
		duration = 4
		has_term_election = yes
		states_general_mechanic = {
			statists = {
				diplomatic_reputation = 1
				global_unrest = -1
				legitimacy = -0.5
			}

			monarchists = {
				prestige = 0.5
				manpower_recovery_speed = 0.1
				legitimacy = 0.5
			}
		}
	}
}

general_estates_reform = {
	icon = "paper_with_seal"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	modifiers = {
		production_efficiency = 0.1
	}
	ai = {
		factor = 1
		modifier = {
			factor = 1.2
			production_income_percentage = 0.25
		}
	}
}

legislative_sejm = {
	icon = "legislative_sejm_reform"
	allow_normal_conversion = yes
	
	potential = {
		has_reform = elective_monarchy
		has_dlc = "Res Publica"
	}
	
	trigger = {
		has_reform = elective_monarchy
	}
	
	modifiers = {
		local_heir_adm = 1
		local_heir_dip = 1
		local_heir_mil = 1
	}
	
	ai = {
		factor = 1
	}
}

integrated_sejmiks = {
	icon = "integrated_sejmiks_reform"
	allow_normal_conversion = yes
	
	potential = {
		has_reform = elective_monarchy
		has_dlc = "Res Publica"
	}
	
	trigger = {
		has_reform = elective_monarchy
	}
	
	modifiers = {
		years_of_nationalism = -5
	}
	
	ai = {
		factor = 1
	}
}

imperial_decree_reform = {
	icon = "king"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = yes
	}
	modifiers = {
		max_revolutionary_zeal = 20
	}
	ai = {
		factor = 2.5
	}
}

#absolute_rule_vs_constitutional

letat_cest_moi_reform = {
	icon = "queen"
	allow_normal_conversion = yes
	modifiers = {
		governing_capacity = 250
	}
	ai = {
		factor = 1.5
		modifier = {
			factor = 2
			tag = FRA
		}
	}
}

regional_representation_reform = {
	icon = "assembly_hall"
	allow_normal_conversion = yes
	modifiers = {
		min_autonomy_in_territories = -0.10
	}
}

consulate_reform = {
	icon = "revolutionary_republic"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = yes
	}
	modifiers = {
		global_autonomy = -0.05
		governing_capacity = 150
	}
	ai = {
		factor = 2.5
	}
}

#separation_of_power

political_absolutism_reform = {
	icon = "judge"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	modifiers = {
		max_absolutism = 5
		yearly_absolutism = 0.5
	}
	ai = {
		factor = 1.5
		modifier = {
			factor = 2
			tag = FRA
		}
	}
}

legislative_houses_reform = {
	icon = "parliament_hall"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	modifiers = {
		possible_adm_policy = 1
	}
}

become_a_republic_reform = {
	icon = "parliament_highlighted"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	trigger = {
		NOT = { has_government_attribute_short_desc = locked_government_type }
		is_emperor = no
		NOT = { is_lesser_in_union = yes }
	}
	effect = {
		set_country_flag = populists_in_government
		lose_reforms = 3
		change_government = republic
	}
	ai = {
		factor = 0
	}
}

install_theocratic_government_reform = {
	icon = "pope_highlighted"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = no
	}
	trigger = {
		NOT = { has_government_attribute_short_desc = locked_government_type }
		is_emperor = no
		NOT = { is_lesser_in_union = yes }
	}
	effect = {
		set_country_flag = populists_in_government
		lose_reforms = 4
		change_government = theocracy
	}
	ai = {
		factor = 0
	}
}

emperor_of_the_revolution_reform = {
	icon = "emperor_of_the_revolution_reform"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Emperor"
		is_revolutionary = yes
	}
	modifiers = {
		yearly_revolutionary_zeal = 1.5
	}
	ai = {
		factor = 2.5
	}
}

enlightened_monarchy_reform = {
	icon = "enlightened_monarchy_reform"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = yes
	}
	modifiers = {
		global_unrest = -2
		num_accepted_cultures = 2
	}
	ai = {
		factor = 2.5
	}
}

become_rev_republic_reform = {
	icon = "become_rev_republic_reform"
	allow_normal_conversion = yes

	potential = { 
		is_revolutionary = yes
	}
	
	trigger = {
		has_reform = revolutionary_empire_reform
	}

	modifiers = {
	}
	effect = {
		if = {
			limit = { has_government_attribute = states_general_mechanic }
			set_country_flag = had_states_general_mechanic
		}
		set_country_flag = populists_in_government
		lose_reforms = 3
		change_government = republic
		add_government_reform = revolutionary_republic_reform
		if = {
			limit = { has_country_flag = had_states_general_mechanic }
			country_event = { id = dutch_republic.33 }
			clr_country_flag = had_states_general_mechanic
		}
	}
	ai = {
		factor = 0
	}
}
